(0) Obligation:
Clauses:
f(c(s(X), Y)) :- f(c(X, s(Y))).
g(c(X, s(Y))) :- g(c(s(X), Y)).
h(X) :- ','(f(X), g(X)).
Query: h(g)
(1) PrologToDTProblemTransformerProof (SOUND transformation)
Built DT problem from termination graph DT10.
(2) Obligation:
Triples:
fA(s(X1), X2) :- fA(X1, s(X2)).
gB(X1, s(X2)) :- gB(s(X1), X2).
hC(c(s(X1), X2)) :- fA(X1, X2).
hC(c(s(X1), X2)) :- ','(fcA(X1, X2), gB(X1, X2)).
Clauses:
fcA(s(X1), X2) :- fcA(X1, s(X2)).
gcB(X1, s(X2)) :- gcB(s(X1), X2).
Afs:
hC(x1) = hC(x1)
(3) TriplesToPiDPProof (SOUND transformation)
We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes:
hC_in: (b)
fA_in: (b,b)
fcA_in: (b,b)
gB_in: (b,b)
Transforming
TRIPLES into the following
Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:
HC_IN_G(c(s(X1), X2)) → U3_G(X1, X2, fA_in_gg(X1, X2))
HC_IN_G(c(s(X1), X2)) → FA_IN_GG(X1, X2)
FA_IN_GG(s(X1), X2) → U1_GG(X1, X2, fA_in_gg(X1, s(X2)))
FA_IN_GG(s(X1), X2) → FA_IN_GG(X1, s(X2))
HC_IN_G(c(s(X1), X2)) → U4_G(X1, X2, fcA_in_gg(X1, X2))
U4_G(X1, X2, fcA_out_gg(X1, X2)) → U5_G(X1, X2, gB_in_gg(X1, X2))
U4_G(X1, X2, fcA_out_gg(X1, X2)) → GB_IN_GG(X1, X2)
GB_IN_GG(X1, s(X2)) → U2_GG(X1, X2, gB_in_gg(s(X1), X2))
GB_IN_GG(X1, s(X2)) → GB_IN_GG(s(X1), X2)
The TRS R consists of the following rules:
fcA_in_gg(s(X1), X2) → U7_gg(X1, X2, fcA_in_gg(X1, s(X2)))
U7_gg(X1, X2, fcA_out_gg(X1, s(X2))) → fcA_out_gg(s(X1), X2)
Pi is empty.
We have to consider all (P,R,Pi)-chains
Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES
(4) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
HC_IN_G(c(s(X1), X2)) → U3_G(X1, X2, fA_in_gg(X1, X2))
HC_IN_G(c(s(X1), X2)) → FA_IN_GG(X1, X2)
FA_IN_GG(s(X1), X2) → U1_GG(X1, X2, fA_in_gg(X1, s(X2)))
FA_IN_GG(s(X1), X2) → FA_IN_GG(X1, s(X2))
HC_IN_G(c(s(X1), X2)) → U4_G(X1, X2, fcA_in_gg(X1, X2))
U4_G(X1, X2, fcA_out_gg(X1, X2)) → U5_G(X1, X2, gB_in_gg(X1, X2))
U4_G(X1, X2, fcA_out_gg(X1, X2)) → GB_IN_GG(X1, X2)
GB_IN_GG(X1, s(X2)) → U2_GG(X1, X2, gB_in_gg(s(X1), X2))
GB_IN_GG(X1, s(X2)) → GB_IN_GG(s(X1), X2)
The TRS R consists of the following rules:
fcA_in_gg(s(X1), X2) → U7_gg(X1, X2, fcA_in_gg(X1, s(X2)))
U7_gg(X1, X2, fcA_out_gg(X1, s(X2))) → fcA_out_gg(s(X1), X2)
Pi is empty.
We have to consider all (P,R,Pi)-chains
(5) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 7 less nodes.
(6) Complex Obligation (AND)
(7) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
GB_IN_GG(X1, s(X2)) → GB_IN_GG(s(X1), X2)
The TRS R consists of the following rules:
fcA_in_gg(s(X1), X2) → U7_gg(X1, X2, fcA_in_gg(X1, s(X2)))
U7_gg(X1, X2, fcA_out_gg(X1, s(X2))) → fcA_out_gg(s(X1), X2)
Pi is empty.
We have to consider all (P,R,Pi)-chains
(8) UsableRulesProof (EQUIVALENT transformation)
For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.
(9) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
GB_IN_GG(X1, s(X2)) → GB_IN_GG(s(X1), X2)
R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
(10) PiDPToQDPProof (EQUIVALENT transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(11) Obligation:
Q DP problem:
The TRS P consists of the following rules:
GB_IN_GG(X1, s(X2)) → GB_IN_GG(s(X1), X2)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(12) QDPSizeChangeProof (EQUIVALENT transformation)
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.
From the DPs we obtained the following set of size-change graphs:
- GB_IN_GG(X1, s(X2)) → GB_IN_GG(s(X1), X2)
The graph contains the following edges 2 > 2
(13) YES
(14) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
FA_IN_GG(s(X1), X2) → FA_IN_GG(X1, s(X2))
The TRS R consists of the following rules:
fcA_in_gg(s(X1), X2) → U7_gg(X1, X2, fcA_in_gg(X1, s(X2)))
U7_gg(X1, X2, fcA_out_gg(X1, s(X2))) → fcA_out_gg(s(X1), X2)
Pi is empty.
We have to consider all (P,R,Pi)-chains
(15) UsableRulesProof (EQUIVALENT transformation)
For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.
(16) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
FA_IN_GG(s(X1), X2) → FA_IN_GG(X1, s(X2))
R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
(17) PiDPToQDPProof (EQUIVALENT transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(18) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FA_IN_GG(s(X1), X2) → FA_IN_GG(X1, s(X2))
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(19) QDPSizeChangeProof (EQUIVALENT transformation)
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.
From the DPs we obtained the following set of size-change graphs:
- FA_IN_GG(s(X1), X2) → FA_IN_GG(X1, s(X2))
The graph contains the following edges 1 > 1
(20) YES